<?php

require_once "sdk/TopSdk.php";
/*
*@$phone 手机号码
*@code   短信验证码
*@flg    短信签名
*@msc    短信模板ID
*@product 公司名称
*/



class Common_Alidayu{

 public function register($phone,$code,$product,$flg="注册验证",$msc="SMS_16220588")
{
   $c = new TopClient;
   $c ->appkey ='23466119';
   $c ->secretKey = 'f259e4f9c471b45e331e28a10830e570' ;
   $req = new AlibabaAliqinFcSmsNumSendRequest;
   $req ->setExtend( "123456" );
   $req ->setSmsType( "normal" );
   $req ->setSmsFreeSignName( $flg );
   $req ->setSmsParam( "{code:'$code',product:'$product'}");
   $req ->setRecNum( $phone);
   $req ->setSmsTemplateCode( $msc );
   $resp = $c ->execute( $req );

   return $resp;
 }

}
